﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using V = Science.Mathematics.VectorCalculus;

namespace VectorCalculus5Ed.Chapter1.Section1
{
    public class Example04
    {
        public Example04()
		{
		}
		private string result;
		public string Result
		{
			get{return result;}
		}
		public void Compute()
		{
            V.Vector u = new V.Vector(3);
            u[0] = 3.0;
            u[1] = 2.0;
            V.Vector v = new V.Vector(3);
            v[0] = 2.0;
            v[1] = 0.0;

            V.Vector v3 = u + v;

            result += v3[0].ToString() + "   " +
                v3[1].ToString() + "   " + v3[2].ToString() + "\r\n";

            V.Vector v2 = -2.0*u;

            result += v2[0].ToString() + "   " +
                v2[1].ToString() + "   " + v2[2].ToString() + "   ";   
        }
    }
}

/* 5   2   0
-6   -4   0 */  
